package com.lxc.graduation.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lxc.graduation.dao.TopicMapper;
import com.lxc.graduation.entity.domain.Topic;
import com.lxc.graduation.service.TopicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: ck
 * @Description:
 * @Date: Create in 22:18 2021/2/1
 */
@Service
public class TopicServiceImpl implements TopicService {
    @Autowired
    private TopicMapper topicMapper;

    @Override
    public List<Topic> listAll() {
        return topicMapper.selectList(new QueryWrapper<>());
    }


    @Override
    public void insert(Topic topic) {
        topicMapper.insert(topic);
    }
}
